package com.nbsaas.boot.project.data.entity;

import com.nbsaas.boot.code.annotation.FieldConvert;
import com.nbsaas.boot.code.annotation.FieldName;
import com.nbsaas.boot.code.annotation.FormAnnotation;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.Data;

@Data
@FormAnnotation(title = "项目条目")
@Entity
@Table(name = "nb_project_entry")
public class ProjectEntry extends AbstractEntity {

    private String name;

    @FieldConvert
    @FieldName
    @ManyToOne(fetch = FetchType.LAZY)
    private Project project;

}
